package com.sniff.atp.dto.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class CustomerPlatformOrderItemRespDTO {

    @ApiModelProperty(value = "平台订单详情表id")
    private Long platformOrderItemId;

    @ApiModelProperty(value = "平台订单表id")
    private Long platformOrderId;

    @ApiModelProperty(value = "商品类型: 1-普通商品; 2-OEM商品; 3-组合商品")
    private Integer productType;

    @ApiModelProperty(value = "系统订单编号")
    private String systemOrderNo;

    @ApiModelProperty("组合状态：1-未组合; 2-组合中；3-组合完成；4-取消组合")
    private Integer combinationStatus;

    @ApiModelProperty(value = "业务类型;1-市场购;2-透明购")
    private Integer channel;

    @ApiModelProperty(value = "商品图片")
    private String productMainImg;

    @ApiModelProperty(value = "商品sku图")
    private String productSkuImg;

    @ApiModelProperty(value = "商品名称")
    private String productTitle;

    @ApiModelProperty(value = "商品名称日文")
    private String productTitleJp;

    @ApiModelProperty(value = "详情URL")
    private String productDetailUrl;

    @ApiModelProperty(value = "商品规格")
    private String productPropertiesName;

    @ApiModelProperty(value = "平台商品SPU")
    private String productCode;

    @ApiModelProperty(value = "平台商品SKU")
    private String productSku;

    @ApiModelProperty(value = "店铺商品SKU(店铺商品库)")
    private String shopProductSku;

    @ApiModelProperty(value = "下单数量=冻结数量+销售数量")
    private Integer orderQuantity;

    @ApiModelProperty(value = "销售数量")
    private Integer sellQuantity;

    @ApiModelProperty(value = "商品单价")
    private BigDecimal actualProductSellPrice;

    @ApiModelProperty(value = "总价")
    private BigDecimal actualTotalProductSellPrice;

    @ApiModelProperty(value = "商品状态: 1-待采购; 2-采购中; 3-已采购; 4-国内运输中; 5-已入库; 6-检品中; 7-已上架(已清算); 8-待发货; 9-已发货; 10-异常; 11-次品; 12-取消成功; 13-保留库存")
    private String orderItemStatus;

    @ApiModelProperty(value = "售后状态(0: 未售后 1:已售后)")
    private Integer afterSalesStatus;

    @ApiModelProperty(value = "客户商品番号(客户自定义商品番号)")
    private String customerProductNo;

    @ApiModelProperty(value = "取消结果：0-未处理; 1-处理中; 2-保留库存; 3-取消成功")
    private Integer cancelProgress;

    @ApiModelProperty(value = "取消状态(1-未取消; 2-取消中; 3-取消成功; 4-保留库存)")
    private Integer cancelStatus;

    @ApiModelProperty(value = "优先发货状态(0-否; 1-是)")
    private Integer priorityShippingStatus;

    @ApiModelProperty(value = "发货状态(0-待处理; 1-部分发货; 2-可发货; 3-已发货; 4-待发货)")
    private Integer deliveryStatus;

    @ApiModelProperty(value = "OEM订单类型: 1-OEM寻源单样品单; 2-OEM寻源单大货单; 3-OEM复购申请样品单; 4-OEM复购申请大货单")
    private Integer oemOrderType;

    @ApiModelProperty(value = "OEM商品分类表id：1-服装; 2-杂货; 3-辅料")
    private Integer oemProductClassificationId;

    @ApiModelProperty(value = "寻源单表id")
    private Long searchSourceOrderId;

    @ApiModelProperty(value = "寻源单编号")
    private String searchSourceOrderNo;

    @ApiModelProperty(value = "寻源单复购申请表id")
    private Long searchSourceOrderRepurchaseApplyId;

    @ApiModelProperty(value = "寻源单报价采购员-后台用户id")
    private Long searchSourceOrderPurchaserUserId;

    @ApiModelProperty(value = "寻源单报价采购员-用户姓名")
    private String searchSourceOrderPurchaserUserName;

    @ApiModelProperty(value = "待采购(>0时显示)")
    private Integer waitPurchaeQuantity;

    @ApiModelProperty(value = "采购中(>0时显示)")
    private Integer purchasingQuantity;

    @ApiModelProperty(value = "已采购(>0时显示)")
    private Integer hasPurchaeQuantity;

    @ApiModelProperty(value = "国内运输中(>0时显示)")
    private Integer expressQuantity;

    /**
     * 加入 入库 和 已上架
     */

    @ApiModelProperty(value = "已入库(>0时显示)")
    private Integer stockInQuantity;

    @ApiModelProperty(value = "已入库(>0时显示) 【计算使用】", hidden = true)
    private Integer realStockInQuantity;

    @ApiModelProperty(value = "检品中(>0时显示)")
    private Integer checkingQuantity;

    @ApiModelProperty(value = "经过检品中数量")
    private Integer afterCheckingQuantity;

    @ApiModelProperty(value = "已上架(>0时显示)")
    private Integer checkedQuantity;

    @ApiModelProperty(value = "已上架(>0时显示)【计算使用】", hidden = true)
    private Integer realCheckedQuantity;

    @ApiModelProperty("质检上架数(针对组合商品的子商品)")
    private Integer checkingShelveQuantity;

    @ApiModelProperty(value = "待发货数量(>0时显示)")
    private Integer deliveredQuantity;

    @ApiModelProperty(value = "已发货(>0时显示)")
    private Integer hasDeliverQuantity;

    @ApiModelProperty(value = "异常(>0时显示)")
    private Integer confirmQuantity;

    @ApiModelProperty(value = "次品(>0时显示)")
    private Integer badQuantity;

    @ApiModelProperty(value = "次品归客户数量(>0时显示)")
    private Integer badClientQuantity;

    @ApiModelProperty(value = "仓库取消数量")
    private Integer wmsCancelQuantity;

    @ApiModelProperty(value = "取消并退款(>0时显示)")
    private Integer cancleAndRefundQuantity;

    @ApiModelProperty(value = "保留库存数量(>0时显示)")
    private Integer keepStockQuantity;

    @ApiModelProperty(value = "国内运费")
    private BigDecimal domesticShipping;

    @ApiModelProperty(value = "国际运费")
    private BigDecimal internationalShippingFee;

    @ApiModelProperty(value = "档口手续费")
    private BigDecimal stallHandlingFee;

    @ApiModelProperty(value = "代买手续费")
    private BigDecimal purchasingFee;

    @ApiModelProperty(value = "入库手续费")
    private BigDecimal storageFee;

    @ApiModelProperty(value = "质检手续费")
    private BigDecimal qualityInspectionFee;

    @ApiModelProperty(value = "出库手续费")
    private BigDecimal deliverStorageFee;

    @ApiModelProperty(value = "发货手续费")
    private BigDecimal shippingFee;

    @ApiModelProperty(value = "附加项费用")
    private BigDecimal additionalFee;
    @ApiModelProperty(value = "子商品仓库已上架数量")
    private Integer combinationProductShelfQuantity;

    @ApiModelProperty(value = "组合商品-子商品订单详情")
    private List<CustomerPlatformOrderItemRespDTO> combinationOrderItemList;

    @ApiModelProperty(value = "订单商品附加项")
    private List<PlatformOrderItemAdditionDTO> platformOrderItemAdditionDTOList;

    @ApiModelProperty("结算价格")
    private List<SettlePrice> settlePriceList;

    private List<OrderItemStatusDTO> orderItemStatusList;

    @Data
    public static final class SettlePrice {

        private Integer num;

        private BigDecimal price;

    }


    @ApiModelProperty(value = "冻结数量")
    private Integer freezeQuantity;

    @ApiModelProperty("是否是组合商品的子商品(0:不是 1:是)")
    private Integer combinationProductItemFlag;

    @ApiModelProperty(value = "订单类型: 1-直发订单; 2-囤货订单")
    private Integer orderType;
}
